<div id="page-wrapper-record">
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">报修记录</h1>
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    详细信息
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="col-lg-12">
                        <div id="toolbar" class="btn-group">
                            <button id="btn_add" class="btn btn-default" data-toggle="modal" data-target="#addRecordModal">
                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
                            </button>
                            <button id="btn_edit" class="btn btn-default">
                            <!--<button id="btn_edit" class="btn btn-default" data-toggle="modal" data-target="#modifyRecordModal">-->
                                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
                            </button>
                            <button id="btn_delete" class="btn btn-default">
                                <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
                            </button>
                        </div>
                    </div>
                    <table class="table-responsive" id="tb_records"></table>
                    <!-- /.table-responsive -->
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->
        </div>
        <!-- /.col-lg-12 -->
    </div>
    <!-- /.row -->
    <!-- 添加模态框 -->
    <div class="modal fade " id="addRecordModal" tabindex="-1" role="dialog" aria-labelledby="addRecordModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="addRecordModalLabel">添加维修记录</h4>
                </div>

                <div class="modal-body">
                    <form id="addRecord">
                        <input type="hidden" name="userId" th:value="${session.user.userId}">
                        <div class="form-group">
                            <label for="category" class="control-label">故障类型</label>
                            <input type="text" class="form-control" id="category" name="category">
                        </div>
                        <div class="form-group">
                            <label for="comment" class="control-label">备注信息</label>
                            <input type="text" class="form-control" id="comment" name="comment">
                        </div>
                        <div class="text-right">
                            <span id="addMessage" class="glyphicon"> </span>
                            <button type="button" class="btn btn-default right" data-dismiss="modal">关闭</button>
                            <button id="addRecordBtn" type="button" class="btn btn-primary">添加</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- 模态框结束 -->
    <!-- 修改模态框 -->
    <div class="modal fade " id="modifyRecordModal" tabindex="-1" role="dialog" aria-labelledby="modifyRecordModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="modifyRecordModalLabel">添加维修记录</h4>
                </div>

                <div class="modal-body">
                    <form id="modifyRecord">
                        <input type="hidden" id="faultId-modify" name="faultId">
                        <div class="form-group">
                            <label for="category" class="control-label">故障类型</label>
                            <input type="text" class="form-control" id="category-modify" name="category">
                        </div>
                        <div class="form-group">
                            <label for="comment" class="control-label">备注信息</label>
                            <input type="text" class="form-control" id="comment-modify" name="comment">
                        </div>
                        <div class="text-right">
                            <span id="modifyMessage" class="glyphicon"> </span>
                            <button type="button" class="btn btn-default right" data-dismiss="modal">关闭</button>
                            <button id="modifyRecordBtn" type="button" class="btn btn-primary">修改</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- 模态框结束 -->
</div>